//顶栏
app.controller('navCtrl', function ($scope, $http) {
  // 脱机
  // isOffline = true;
  $http.get('/deploy/main/offline').then(function (response) {
    isOffline = response.data.data.offline;

    var s = "";
    if (isOffline) s = " - 脱机版"
    $scope.systemName = systemName + s;
    $scope.systemVersion = systemVersion;
    $scope.systemMsgs = [];
    $scope.hasNew = 0;
  });

  $('.msg-dropdown').click(function (e) {
    e.stopPropagation();
  });
});

//路径导航
app.controller('pathCtrl', function ($scope, $http) {

  $scope.pageIndex = 0;
  $http.get('/deploy/main/offline').then(function (response) {
    isOffline = response.data.data.offline;

    if (isOffline) $scope.pages = pagesOffline;
    else $scope.pages = pages;
  });

});